#ifndef IWINDOW_H_INCLUDED
#define IWINDOW_H_INCLUDED

/**
 *
 * \file IWindow.h
 * \brief This file contains the IWindow interface declaration.
 * \author Vladimir Klubkov (aka marked)
 *
 * Last changes date:
 * \date 13.03.2011
 *
 * Copyright 2011 Vladimir Klubkov <marked-one@yandex.ru>
 *
 * This file is part of OOXlib.
 *
 * OOXLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * OOXlib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OOXlib; if not, you can try to find  it here:
 * http://www.gnu.org/licenses/gpl.txt
 * or write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA  02111-1307  USA
 *
 */

#include "includes.h"
#include "shapes.h"

namespace OOXlib {

/**
 * \interface IWindow
 * Window interface.
 */
class IWindow {
public:
    virtual ~IWindow() {};
// Getters.
    virtual ::Window Get() const = 0;
    virtual operator ::Window() const = 0;
    virtual CUInt2dRectangle GetRectangle() const = 0;
    virtual CUInt2dPoint GetPosition() const = 0;
    virtual CUInt2dSize GetSize() const = 0;
// Setters.
    virtual void SetRectangle(const CUInt2dRectangle &Rectangle) = 0;
// Register window.
    virtual size_t Register(IWindow *pWindow) = 0;
    virtual void Unregister(const size_t iId) = 0;
// Run event handler.
    virtual bool RunEventHandler(::XEvent &Event) = 0;
// Hide/show wiindow.
    virtual void Hide() = 0;
    virtual void Show() = 0;
// Handlers.
    virtual void OnCreate() = 0;
    virtual void OnDestroy() = 0;
    virtual void OnShow() = 0;
    virtual void OnHide() = 0;
    virtual void OnExpose() = 0;
    virtual void OnButtonPress(const unsigned int iButton, const int iX, const int iY) = 0;
    virtual void OnButtonRelease(const unsigned int iButton, const int iX, const int iY) = 0;
    virtual void OnKeyPress(const ::XID iKey) = 0;
    virtual void OnKeyRelease(const ::XID iKey) = 0;
    virtual void OnMouseEnter(const int iX, const int iY) = 0;
    virtual void OnMouseExit(const int iX, const int iY) = 0;
    virtual void OnMouseMove(const int iX, const int iY) = 0;
    virtual void OnGotFocus() = 0;
    virtual void OnLostFocus() = 0;
};

} // OOXlib

#endif // IWINDOW_H_INCLUDED
